const http = require('http')
const fs   = require('fs')

const server = http.createServer((req, res) => {
	if (req.url === '/favicon.ico') {
		return
	}
	const wenjianjia = []
	fs.readdir('./album', (err, files) => {
		files.forEach(filename => {
			fs.stat('./album/' + filename, (err, stats) => {
				if (stats.isDirectory()) {
				}
				wenjianjia.push(filename)

				console.log(wenjianjia)
			})
		})
	})
	// res.end('hhhh')
})

server.listen(3000,"127.0.0.1", () => {
	console.log('running')
})